#include "FileSystem.h"

#include "utility/filsys.h"

#include <iostream>
#include <fstream>

using namespace std;

int main() {
	FileSystem * fs = new FileSystem("floppy");
	//fs->print();
	Inode * in = fs->findInode("/filsys/macro.h");
	if (in > 0)
		cout << in->inode_nr;
	Inode * ip1 = fs->findInode("/");
	cout << ip1 << "\n";
	Inode * ip2 = fs->findFile(ip1, ".");
	cout << ((ip1 == ip2) ? "test" : "...");
	OpenFile * o = fs->open("/filsys/tune.h");
	char * buffer = new char[6000];
	fs->read(o, buffer, 0);
	cout << buffer;
	fs->browse();
}

